import React from 'react'

import { Routes, Route,Navigate} from "react-router-dom"

import NoFound from './components/404'
import Login from './components/Login'
import Main from './components/Main'
import About from './components/Main/About'
import Home from './components/Main/Home'

export default function App() {
  return (
    <div >
    <Routes>
      <Route path="/login" element={<Login />} />
      <Route path="/main" element={<Main />} >
        <Route path="/main/home" element={<Home />} />
        <Route path="/main/about" element={<About />} />
      </Route>
      <Route path="*" element={<NoFound />} />
      {/* 重定向到login登录页 */}
      <Route path="/" element={<Navigate to='/login' />} />
    </Routes>
  </div>
  )
}

